<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理系统</title>

<link href="themes/default/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="themes/css/core.css" rel="stylesheet" type="text/css" media="screen"/> 
<link href="themes/css/print.css" rel="stylesheet" type="text/css" media="print"/>
<link href="uploadify/css/uploadify.css" rel="stylesheet" type="text/css" media="screen"/>
<!--[if IE]>
<link href="themes/css/ieHack.css" rel="stylesheet" type="text/css" media="screen"/>
<![endif]-->

<!--[if lt IE 9]><script src="js/speedup.js" type="text/javascript"></script><script src="js/jquery-1.11.3.min.js" type="text/javascript"></script><![endif]-->
<!--[if gte IE 9]><!-->

<script src="js/jquery-2.1.4.min.js" type="text/javascript"></script><!--<![endif]-->

<script src="js/jquery.cookie.js" type="text/javascript"></script>
<script src="js/jquery.validate.js" type="text/javascript"></script>
<script src="js/jquery.bgiframe.js" type="text/javascript"></script>
<script src="xheditor/xheditor-1.2.2.min.js" type="text/javascript"></script>
<script src="xheditor/xheditor_lang/zh-cn.js" type="text/javascript"></script>
<script src="uploadify/scripts/jquery.uploadify.js" type="text/javascript"></script>

<!-- svg图表  supports Firefox 3.0+, Safari 3.0+, Chrome 5.0+, Opera 9.5+ and Internet Explorer 6.0+ -->
<script type="text/javascript" src="chart/raphael.js"></script>
<script type="text/javascript" src="chart/g.raphael.js"></script>
<script type="text/javascript" src="chart/g.bar.js"></script>
<script type="text/javascript" src="chart/g.line.js"></script>
<script type="text/javascript" src="chart/g.pie.js"></script>
<script type="text/javascript" src="chart/g.dot.js"></script>

<!-- 
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=6PYkS1eDz5pMnyfO0jvBNE0F"></script>
<script type="text/javascript" src="http://api.map.baidu.com/library/Heatmap/2.0/src/Heatmap_min.js"></script>
 -->
<script src="js/dwz.core.js" type="text/javascript"></script>
<script src="js/dwz.util.date.js" type="text/javascript"></script>
<script src="js/dwz.validate.method.js" type="text/javascript"></script>
<script src="js/dwz.barDrag.js" type="text/javascript"></script>
<script src="js/dwz.drag.js" type="text/javascript"></script>
<script src="js/dwz.tree.js" type="text/javascript"></script>
<script src="js/dwz.accordion.js" type="text/javascript"></script>
<script src="js/dwz.ui.js" type="text/javascript"></script>
<script src="js/dwz.theme.js" type="text/javascript"></script>
<script src="js/dwz.switchEnv.js" type="text/javascript"></script>
<script src="js/dwz.alertMsg.js" type="text/javascript"></script>
<script src="js/dwz.contextmenu.js" type="text/javascript"></script>
<script src="js/dwz.navTab.js" type="text/javascript"></script>
<script src="js/dwz.tab.js" type="text/javascript"></script>
<script src="js/dwz.resize.js" type="text/javascript"></script>
<script src="js/dwz.dialog.js" type="text/javascript"></script>
<script src="js/dwz.dialogDrag.js" type="text/javascript"></script>
<script src="js/dwz.sortDrag.js" type="text/javascript"></script>
<script src="js/dwz.cssTable.js" type="text/javascript"></script>
<script src="js/dwz.stable.js" type="text/javascript"></script>
<script src="js/dwz.taskBar.js" type="text/javascript"></script>
<script src="js/dwz.ajax.js" type="text/javascript"></script>
<script src="js/dwz.pagination.js" type="text/javascript"></script>
<script src="js/dwz.database.js" type="text/javascript"></script>
<script src="js/dwz.datepicker.js" type="text/javascript"></script>
<script src="js/dwz.effects.js" type="text/javascript"></script>
<script src="js/dwz.panel.js" type="text/javascript"></script>
<script src="js/dwz.checkbox.js" type="text/javascript"></script>
<script src="js/dwz.history.js" type="text/javascript"></script>
<script src="js/dwz.combox.js" type="text/javascript"></script>
<script src="js/dwz.file.js" type="text/javascript"></script>
<script src="js/dwz.print.js" type="text/javascript"></script>
<script src="js/jquery.timers.js"  type="text/javascript"></script>
<script src="js/buildtree.js" type="text/javascript"></script>

<!-- 可以用dwz.min.js替换前面全部dwz.*.js (注意：替换时下面dwz.regional.zh.js还需要引入)
<script src="bin/dwz.min.js" type="text/javascript"></script>
-->
<script src="js/dwz.regional.zh.js" type="text/javascript"></script>

<script type="text/javascript">
$(function(){
	//menuData = ajaxbuildMainMenu('jsonQuerySysFunction','#mainmenu');
	DWZ.init("dwz.frag.xml", {
		loginUrl:"login_dialog.html", loginTitle:"登录",	// 弹出登录对话框
//		loginUrl:"login.html",	// 跳到登录页面
		statusCode:{ok:200, error:300, timeout:301}, //【可选】
		pageInfo:{pageNum:"pageNum", numPerPage:"numPerPage", orderField:"orderField", orderDirection:"orderDirection"}, //【可选】
		keys: {statusCode:"statusCode", message:"message"}, //【可选】
		ui:{hideMode:'offsets'}, //【可选】hideMode:navTab组件切换的隐藏方式，支持的值有’display’，’offsets’负数偏移位置的值，默认值为’display’
		debug:false,	// 调试模式 【true|false】
		callback:function(){
			initEnv();
			$("#themeList").theme({themeBase:"themes"}); // themeBase 相对于index页面的主题base路径x
		}
	});
});
</script>

</head>
<%
	String rightDeptIdListJson = "",sysUserFuncListJson = "",deptTreeJson = "",currentusercode="",currentuserid="";
	if(request.getSession().getAttribute("usercode")!=null)
		currentusercode = request.getSession().getAttribute("usercode").toString();
	if(request.getSession().getAttribute("userid")!=null)
		currentuserid = request.getSession().getAttribute("userid").toString();
	if(request.getSession().getAttribute("rightDeptIdListJson")!=null)
		rightDeptIdListJson = request.getSession().getAttribute("rightDeptIdListJson").toString();
	if(request.getSession().getAttribute("sysUserFuncListJson")!=null)
		sysUserFuncListJson = request.getSession().getAttribute("sysUserFuncListJson").toString();
	if(request.getSession().getAttribute("deptTreeJson")!=null)
		deptTreeJson = request.getSession().getAttribute("deptTreeJson").toString();
%>
<body>
	<div id="layout">
		<div id="header">
			<div class="headerNav">
				<a class="" href="" ></a>
				<ul class="nav">
					 <li><a href=""  width="600">当前用户:<%=currentusercode%></a></li>
				    <li><a href="changePassword.jsp" target="dialog" width="600">修改密码</a></li>
					<li><a href="login.jsp">退出</a></li>
				</ul>
				<ul class="themeList" id="themeList">
					<li theme="default"><div class="selected">蓝色</div></li>
				<!--  <li theme="green"><div>绿色</div></li>
					<li theme="purple"><div>紫色</div></li>
					<li theme="silver"><div>银色</div></li>
					<li theme="azure"><div>天蓝</div></li>-->	
				</ul>
			</div>

			<!-- navMenu -->
			
		</div>

		<div id="leftside">
			<div id="sidebar_s">
				<div class="collapse">
					<div class="toggleCollapse"><div></div></div>
				</div>
			</div>
			<div id="sidebar">
				<div class="toggleCollapse"><h2>主菜单</h2><div>收缩</div></div>

				<div class="accordion" fillSpace="sidebar" id="mainmenu">
					 <!-- mainmenu -->
				</div>
			</div>
		</div>
		<div id="container">
			<div id="navTab" class="tabsPage">
				<div class="tabsPageHeader">
					<div class="tabsPageHeaderMargin"><!-- 显示左右控制时添加 class=""  tabsPageHeaderContent -->
						<ul class="navTab-tab">
							<li tabid="main" class="main"><a href="javascript:;"><span><span class="home_icon">我的主页</span></span></a></li>
						</ul>
					</div>
					<div class="tabsLeft tabsLeftDisabled">left</div><!-- 禁用只需要添加一个样式 class="tabsLeft tabsLeftDisabled" -->
					<div class="tabsRight">right</div><!-- 禁用只需要添加一个样式 class="tabsRight tabsRightDisabled" -->
					<div class="tabsMore">more</div>
				</div>
				<ul class="tabsMoreList">
					<li><a href="javascript:;">我的主页</a></li>
				</ul>
				<div class="navTab-panel tabsPageContent layoutBox"> 
					<div class="page unitBox">
						
					</div>
				</div>
			</div>
		</div>

	</div>
<div id="footer2">Copyright &copy; 2018 All Rights Reserved.</div>
<script type="text/javascript">
	function loadcss()
	{
		downLoadCss("themes/default/style.css");
  		downLoadCss("themes/css/core.css");
	}
  	$("body").ready(function() {
		//保存权限信息到Cookie
		var currentuserid = '<%=currentuserid%>';
		var currentusercode = '<%=currentusercode%>';
  		var strRight = '<%=sysUserFuncListJson%>';
  		var rightdata = JSON.parse(strRight);
  		var strRightDept = '<%=rightDeptIdListJson%>';
  		//var strDeptTree = '<%=deptTreeJson%>';
  		
  		//alert('currentuserid:'+currentuserid);
  		//alert('currentusercode:'+currentusercode);
  		//alert('rightDeptIdListJson:'+strRightDept);
  		//alert('sysUserFuncListJson:'+strRight);
  		//alert('deptTreeJson:'+strDeptTree);
  		var shortStrRight = '';
  		for (var i in rightdata.sysUserFuncList) 
		{
			if(shortStrRight!='')
				shortStrRight +='|'; //rightdata.sysUserFuncList[i].funcid+','+
			shortStrRight += rightdata.sysUserFuncList[i].funccode+','+rightdata.sysUserFuncList[i].dataright;
		}
  		//alert(shortStrRight);
  		
  		$.cookie('currentuserid', currentuserid); //, { expires:1} //有效期为1天
  		$.cookie('currentusercode', currentusercode);
  		$.cookie('rightDeptIdListJson', strRightDept);
  		$.cookie('sysUserFuncListJson', shortStrRight); //strRight
  		//$.cookie('deptTreeJson', 'strDeptTree'); //strDeptTree
  		//alert('currentuserid cookie:'+$.cookie('currentuserid'));
  		//alert('currentusercode cookie:'+$.cookie('currentusercode'));
  		//alert('rightDeptIdListJson cookie:'+$.cookie('rightDeptIdListJson'));
  		//alert('sysUserFuncListJson cookie:'+$.cookie('sysUserFuncListJson'));
  		//alert('deptTreeJson cookie:'+$.cookie('deptTreeJson'));
  		ajaxbuildMainMenu('jsonQuerySysFunction','#mainmenu',rightdata); //id="submenu'+item.funcid+'" //
  		canWriteData(11);
  	})
	
</script>
</body>
</html>

<link href="themes/default/style.css" rel="stylesheet" type="text/css" media="screen"/>
<link href="themes/css/core.css" rel="stylesheet" type="text/css" media="screen"/>  -->